/*
 Navicat Premium Data Transfer

 Source Server         : mysql-127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 50718
 Source Host           : 127.0.0.1
 Source Database       : easy-frame

 Target Server Type    : MySQL
 Target Server Version : 50718
 File Encoding         : utf-8

 Date: 07/01/2019 20:52:09 PM
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `act_evt_log`
-- ----------------------------
DROP TABLE IF EXISTS `act_evt_log`;
CREATE TABLE `act_evt_log` (
  `log_nr_` bigint(20) NOT NULL AUTO_INCREMENT,
  `type_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_def_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `execution_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `task_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `time_stamp_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
  `user_id_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `data_` longblob,
  `lock_owner_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `lock_time_` timestamp(3) NULL DEFAULT NULL,
  `is_processed_` tinyint(4) DEFAULT '0',
  PRIMARY KEY (`log_nr_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_ge_bytearray`
-- ----------------------------
DROP TABLE IF EXISTS `act_ge_bytearray`;
CREATE TABLE `act_ge_bytearray` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `name_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `deployment_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `bytes_` longblob,
  `generated_` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`id_`),
  KEY `act_fk_bytearr_depl` (`deployment_id_`),
  CONSTRAINT `act_fk_bytearr_depl` FOREIGN KEY (`deployment_id_`) REFERENCES `act_re_deployment` (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_ge_property`
-- ----------------------------
DROP TABLE IF EXISTS `act_ge_property`;
CREATE TABLE `act_ge_property` (
  `name_` varchar(64) COLLATE utf8_bin NOT NULL,
  `value_` varchar(300) COLLATE utf8_bin DEFAULT NULL,
  `rev_` int(11) DEFAULT NULL,
  PRIMARY KEY (`name_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `act_ge_property`
-- ----------------------------
BEGIN;
INSERT INTO `act_ge_property` VALUES ('next.dbid', '1', '1'), ('schema.history', 'create(5.22.0.0)', '1'), ('schema.version', '5.22.0.0', '1');
COMMIT;

-- ----------------------------
--  Table structure for `act_hi_actinst`
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_actinst`;
CREATE TABLE `act_hi_actinst` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `proc_def_id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `execution_id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `act_id_` varchar(255) COLLATE utf8_bin NOT NULL,
  `task_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `call_proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `act_name_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `act_type_` varchar(255) COLLATE utf8_bin NOT NULL,
  `assignee_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `start_time_` datetime(3) NOT NULL,
  `end_time_` datetime(3) DEFAULT NULL,
  `duration_` bigint(20) DEFAULT NULL,
  `tenant_id_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`id_`),
  KEY `act_idx_hi_act_inst_start` (`start_time_`),
  KEY `act_idx_hi_act_inst_end` (`end_time_`),
  KEY `act_idx_hi_act_inst_procinst` (`proc_inst_id_`,`act_id_`),
  KEY `act_idx_hi_act_inst_exec` (`execution_id_`,`act_id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_hi_attachment`
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_attachment`;
CREATE TABLE `act_hi_attachment` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `user_id_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `name_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `description_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `type_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `task_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `url_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `content_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `time_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_hi_comment`
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_comment`;
CREATE TABLE `act_hi_comment` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `type_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `time_` datetime(3) NOT NULL,
  `user_id_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `task_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `action_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `message_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `full_msg_` longblob,
  PRIMARY KEY (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_hi_detail`
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_detail`;
CREATE TABLE `act_hi_detail` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `type_` varchar(255) COLLATE utf8_bin NOT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `execution_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `task_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `act_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `name_` varchar(255) COLLATE utf8_bin NOT NULL,
  `var_type_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `rev_` int(11) DEFAULT NULL,
  `time_` datetime(3) NOT NULL,
  `bytearray_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `double_` double DEFAULT NULL,
  `long_` bigint(20) DEFAULT NULL,
  `text_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `text2_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_`),
  KEY `act_idx_hi_detail_proc_inst` (`proc_inst_id_`),
  KEY `act_idx_hi_detail_act_inst` (`act_inst_id_`),
  KEY `act_idx_hi_detail_time` (`time_`),
  KEY `act_idx_hi_detail_name` (`name_`),
  KEY `act_idx_hi_detail_task_id` (`task_id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_hi_identitylink`
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_identitylink`;
CREATE TABLE `act_hi_identitylink` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `group_id_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `type_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `user_id_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `task_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_`),
  KEY `act_idx_hi_ident_lnk_user` (`user_id_`),
  KEY `act_idx_hi_ident_lnk_task` (`task_id_`),
  KEY `act_idx_hi_ident_lnk_procinst` (`proc_inst_id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_hi_procinst`
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_procinst`;
CREATE TABLE `act_hi_procinst` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `business_key_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `proc_def_id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `start_time_` datetime(3) NOT NULL,
  `end_time_` datetime(3) DEFAULT NULL,
  `duration_` bigint(20) DEFAULT NULL,
  `start_user_id_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `start_act_id_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `end_act_id_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `super_process_instance_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `delete_reason_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `name_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_`),
  UNIQUE KEY `proc_inst_id_` (`proc_inst_id_`),
  KEY `act_idx_hi_pro_inst_end` (`end_time_`),
  KEY `act_idx_hi_pro_i_buskey` (`business_key_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_hi_taskinst`
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_taskinst`;
CREATE TABLE `act_hi_taskinst` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `proc_def_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `task_def_key_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `execution_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `name_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `parent_task_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `description_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `owner_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `assignee_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `start_time_` datetime(3) NOT NULL,
  `claim_time_` datetime(3) DEFAULT NULL,
  `end_time_` datetime(3) DEFAULT NULL,
  `duration_` bigint(20) DEFAULT NULL,
  `delete_reason_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `priority_` int(11) DEFAULT NULL,
  `due_date_` datetime(3) DEFAULT NULL,
  `form_key_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `category_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`id_`),
  KEY `act_idx_hi_task_inst_procinst` (`proc_inst_id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_hi_varinst`
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_varinst`;
CREATE TABLE `act_hi_varinst` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `execution_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `task_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `name_` varchar(255) COLLATE utf8_bin NOT NULL,
  `var_type_` varchar(100) COLLATE utf8_bin DEFAULT NULL,
  `rev_` int(11) DEFAULT NULL,
  `bytearray_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `double_` double DEFAULT NULL,
  `long_` bigint(20) DEFAULT NULL,
  `text_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `text2_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `create_time_` datetime(3) DEFAULT NULL,
  `last_updated_time_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`id_`),
  KEY `act_idx_hi_procvar_proc_inst` (`proc_inst_id_`),
  KEY `act_idx_hi_procvar_name_type` (`name_`,`var_type_`),
  KEY `act_idx_hi_procvar_task_id` (`task_id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_id_group`
-- ----------------------------
DROP TABLE IF EXISTS `act_id_group`;
CREATE TABLE `act_id_group` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `name_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `type_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_id_info`
-- ----------------------------
DROP TABLE IF EXISTS `act_id_info`;
CREATE TABLE `act_id_info` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `user_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `type_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `key_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `value_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `password_` longblob,
  `parent_id_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_id_membership`
-- ----------------------------
DROP TABLE IF EXISTS `act_id_membership`;
CREATE TABLE `act_id_membership` (
  `user_id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `group_id_` varchar(64) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`user_id_`,`group_id_`),
  KEY `act_fk_memb_group` (`group_id_`),
  CONSTRAINT `act_fk_memb_group` FOREIGN KEY (`group_id_`) REFERENCES `act_id_group` (`id_`),
  CONSTRAINT `act_fk_memb_user` FOREIGN KEY (`user_id_`) REFERENCES `act_id_user` (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_id_user`
-- ----------------------------
DROP TABLE IF EXISTS `act_id_user`;
CREATE TABLE `act_id_user` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `first_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `last_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `email_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `pwd_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `picture_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_procdef_info`
-- ----------------------------
DROP TABLE IF EXISTS `act_procdef_info`;
CREATE TABLE `act_procdef_info` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `proc_def_id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `info_json_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_`),
  UNIQUE KEY `act_uniq_info_procdef` (`proc_def_id_`),
  KEY `act_idx_info_procdef` (`proc_def_id_`),
  KEY `act_fk_info_json_ba` (`info_json_id_`),
  CONSTRAINT `act_fk_info_json_ba` FOREIGN KEY (`info_json_id_`) REFERENCES `act_ge_bytearray` (`id_`),
  CONSTRAINT `act_fk_info_procdef` FOREIGN KEY (`proc_def_id_`) REFERENCES `act_re_procdef` (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_re_deployment`
-- ----------------------------
DROP TABLE IF EXISTS `act_re_deployment`;
CREATE TABLE `act_re_deployment` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `name_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `category_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `deploy_time_` timestamp(3) NULL DEFAULT NULL,
  PRIMARY KEY (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_re_model`
-- ----------------------------
DROP TABLE IF EXISTS `act_re_model`;
CREATE TABLE `act_re_model` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `name_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `key_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `category_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `create_time_` timestamp(3) NULL DEFAULT NULL,
  `last_update_time_` timestamp(3) NULL DEFAULT NULL,
  `version_` int(11) DEFAULT NULL,
  `meta_info_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `deployment_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `editor_source_value_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `editor_source_extra_value_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`id_`),
  KEY `act_fk_model_source` (`editor_source_value_id_`),
  KEY `act_fk_model_source_extra` (`editor_source_extra_value_id_`),
  KEY `act_fk_model_deployment` (`deployment_id_`),
  CONSTRAINT `act_fk_model_deployment` FOREIGN KEY (`deployment_id_`) REFERENCES `act_re_deployment` (`id_`),
  CONSTRAINT `act_fk_model_source` FOREIGN KEY (`editor_source_value_id_`) REFERENCES `act_ge_bytearray` (`id_`),
  CONSTRAINT `act_fk_model_source_extra` FOREIGN KEY (`editor_source_extra_value_id_`) REFERENCES `act_ge_bytearray` (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_re_procdef`
-- ----------------------------
DROP TABLE IF EXISTS `act_re_procdef`;
CREATE TABLE `act_re_procdef` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `category_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `name_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `key_` varchar(255) COLLATE utf8_bin NOT NULL,
  `version_` int(11) NOT NULL,
  `deployment_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `resource_name_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `dgrm_resource_name_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `description_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `has_start_form_key_` tinyint(4) DEFAULT NULL,
  `has_graphical_notation_` tinyint(4) DEFAULT NULL,
  `suspension_state_` int(11) DEFAULT NULL,
  `tenant_id_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`id_`),
  UNIQUE KEY `act_uniq_procdef` (`key_`,`version_`,`tenant_id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_ru_event_subscr`
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_event_subscr`;
CREATE TABLE `act_ru_event_subscr` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `event_type_` varchar(255) COLLATE utf8_bin NOT NULL,
  `event_name_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `execution_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `activity_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `configuration_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `created_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `proc_def_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`id_`),
  KEY `act_idx_event_subscr_config_` (`configuration_`),
  KEY `act_fk_event_exec` (`execution_id_`),
  CONSTRAINT `act_fk_event_exec` FOREIGN KEY (`execution_id_`) REFERENCES `act_ru_execution` (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_ru_execution`
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_execution`;
CREATE TABLE `act_ru_execution` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `business_key_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `parent_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_def_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `super_exec_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `act_id_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `is_active_` tinyint(4) DEFAULT NULL,
  `is_concurrent_` tinyint(4) DEFAULT NULL,
  `is_scope_` tinyint(4) DEFAULT NULL,
  `is_event_scope_` tinyint(4) DEFAULT NULL,
  `suspension_state_` int(11) DEFAULT NULL,
  `cached_ent_state_` int(11) DEFAULT NULL,
  `tenant_id_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `name_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `lock_time_` timestamp(3) NULL DEFAULT NULL,
  PRIMARY KEY (`id_`),
  KEY `act_idx_exec_buskey` (`business_key_`),
  KEY `act_fk_exe_procinst` (`proc_inst_id_`),
  KEY `act_fk_exe_parent` (`parent_id_`),
  KEY `act_fk_exe_super` (`super_exec_`),
  KEY `act_fk_exe_procdef` (`proc_def_id_`),
  CONSTRAINT `act_fk_exe_parent` FOREIGN KEY (`parent_id_`) REFERENCES `act_ru_execution` (`id_`),
  CONSTRAINT `act_fk_exe_procdef` FOREIGN KEY (`proc_def_id_`) REFERENCES `act_re_procdef` (`id_`),
  CONSTRAINT `act_fk_exe_procinst` FOREIGN KEY (`proc_inst_id_`) REFERENCES `act_ru_execution` (`id_`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `act_fk_exe_super` FOREIGN KEY (`super_exec_`) REFERENCES `act_ru_execution` (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_ru_identitylink`
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_identitylink`;
CREATE TABLE `act_ru_identitylink` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `group_id_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `type_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `user_id_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `task_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_def_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_`),
  KEY `act_idx_ident_lnk_user` (`user_id_`),
  KEY `act_idx_ident_lnk_group` (`group_id_`),
  KEY `act_idx_athrz_procedef` (`proc_def_id_`),
  KEY `act_fk_tskass_task` (`task_id_`),
  KEY `act_fk_idl_procinst` (`proc_inst_id_`),
  CONSTRAINT `act_fk_athrz_procedef` FOREIGN KEY (`proc_def_id_`) REFERENCES `act_re_procdef` (`id_`),
  CONSTRAINT `act_fk_idl_procinst` FOREIGN KEY (`proc_inst_id_`) REFERENCES `act_ru_execution` (`id_`),
  CONSTRAINT `act_fk_tskass_task` FOREIGN KEY (`task_id_`) REFERENCES `act_ru_task` (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_ru_job`
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_job`;
CREATE TABLE `act_ru_job` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `type_` varchar(255) COLLATE utf8_bin NOT NULL,
  `lock_exp_time_` timestamp(3) NULL DEFAULT NULL,
  `lock_owner_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `exclusive_` tinyint(1) DEFAULT NULL,
  `execution_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `process_instance_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_def_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `retries_` int(11) DEFAULT NULL,
  `exception_stack_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `exception_msg_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `duedate_` timestamp(3) NULL DEFAULT NULL,
  `repeat_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `handler_type_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `handler_cfg_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`id_`),
  KEY `act_fk_job_exception` (`exception_stack_id_`),
  CONSTRAINT `act_fk_job_exception` FOREIGN KEY (`exception_stack_id_`) REFERENCES `act_ge_bytearray` (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_ru_task`
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_task`;
CREATE TABLE `act_ru_task` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `execution_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_def_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `name_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `parent_task_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `description_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `task_def_key_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `owner_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `assignee_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `delegation_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `priority_` int(11) DEFAULT NULL,
  `create_time_` timestamp(3) NULL DEFAULT NULL,
  `due_date_` datetime(3) DEFAULT NULL,
  `category_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `suspension_state_` int(11) DEFAULT NULL,
  `tenant_id_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `form_key_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_`),
  KEY `act_idx_task_create` (`create_time_`),
  KEY `act_fk_task_exe` (`execution_id_`),
  KEY `act_fk_task_procinst` (`proc_inst_id_`),
  KEY `act_fk_task_procdef` (`proc_def_id_`),
  CONSTRAINT `act_fk_task_exe` FOREIGN KEY (`execution_id_`) REFERENCES `act_ru_execution` (`id_`),
  CONSTRAINT `act_fk_task_procdef` FOREIGN KEY (`proc_def_id_`) REFERENCES `act_re_procdef` (`id_`),
  CONSTRAINT `act_fk_task_procinst` FOREIGN KEY (`proc_inst_id_`) REFERENCES `act_ru_execution` (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Table structure for `act_ru_variable`
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_variable`;
CREATE TABLE `act_ru_variable` (
  `id_` varchar(64) COLLATE utf8_bin NOT NULL,
  `rev_` int(11) DEFAULT NULL,
  `type_` varchar(255) COLLATE utf8_bin NOT NULL,
  `name_` varchar(255) COLLATE utf8_bin NOT NULL,
  `execution_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `proc_inst_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `task_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `bytearray_id_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `double_` double DEFAULT NULL,
  `long_` bigint(20) DEFAULT NULL,
  `text_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `text2_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_`),
  KEY `act_idx_variable_task_id` (`task_id_`),
  KEY `act_fk_var_exe` (`execution_id_`),
  KEY `act_fk_var_procinst` (`proc_inst_id_`),
  KEY `act_fk_var_bytearray` (`bytearray_id_`),
  CONSTRAINT `act_fk_var_bytearray` FOREIGN KEY (`bytearray_id_`) REFERENCES `act_ge_bytearray` (`id_`),
  CONSTRAINT `act_fk_var_exe` FOREIGN KEY (`execution_id_`) REFERENCES `act_ru_execution` (`id_`),
  CONSTRAINT `act_fk_var_procinst` FOREIGN KEY (`proc_inst_id_`) REFERENCES `act_ru_execution` (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

SET FOREIGN_KEY_CHECKS = 1;
